\(\int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx\) [22]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 20, antiderivative size = 104 \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\frac {A x^2 \sqrt {a+b x^2}}{3 b}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {a (16 A+9 B x) \sqrt {a+b x^2}}{24 b^2}+\frac {3 a^2 B \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}} \]

[Out]

3/8*a^2*B*arctanh(x*b^(1/2)/(b*x^2+a)^(1/2))/b^(5/2)+1/3*A*x^2*(b*x^2+a)^(1/2)/b+1/4*B*x^3*(b*x^2+a)^(1/2)/b-1
/24*a*(9*B*x+16*A)*(b*x^2+a)^(1/2)/b^2

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {847, 794, 223, 212} \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\frac {3 a^2 B \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}}-\frac {a \sqrt {a+b x^2} (16 A+9 B x)}{24 b^2}+\frac {A x^2 \sqrt {a+b x^2}}{3 b}+\frac {B x^3 \sqrt {a+b x^2}}{4 b} \]

[In]

Int[(x^3*(A + B*x))/Sqrt[a + b*x^2],x]

[Out]

(A*x^2*Sqrt[a + b*x^2])/(3*b) + (B*x^3*Sqrt[a + b*x^2])/(4*b) - (a*(16*A + 9*B*x)*Sqrt[a + b*x^2])/(24*b^2) +
(3*a^2*B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(8*b^(5/2))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 794

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((e*f + d*g)*(2*p
+ 3) + 2*e*g*(p + 1)*x)*((a + c*x^2)^(p + 1)/(2*c*(p + 1)*(2*p + 3))), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rule 847

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g*(d + e*x)^
m*((a + c*x^2)^(p + 1)/(c*(m + 2*p + 2))), x] + Dist[1/(c*(m + 2*p + 2)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^p*
Simp[c*d*f*(m + 2*p + 2) - a*e*g*m + c*(e*f*(m + 2*p + 2) + d*g*m)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g, p
}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ
[2*m, 2*p]) &&  !(IGtQ[m, 0] && EqQ[f, 0])

Rubi steps \begin{align*} \text {integral}& = \frac {B x^3 \sqrt {a+b x^2}}{4 b}+\frac {\int \frac {x^2 (-3 a B+4 A b x)}{\sqrt {a+b x^2}} \, dx}{4 b} \\ & = \frac {A x^2 \sqrt {a+b x^2}}{3 b}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}+\frac {\int \frac {x (-8 a A b-9 a b B x)}{\sqrt {a+b x^2}} \, dx}{12 b^2} \\ & = \frac {A x^2 \sqrt {a+b x^2}}{3 b}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {a (16 A+9 B x) \sqrt {a+b x^2}}{24 b^2}+\frac {\left (3 a^2 B\right ) \int \frac {1}{\sqrt {a+b x^2}} \, dx}{8 b^2} \\ & = \frac {A x^2 \sqrt {a+b x^2}}{3 b}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {a (16 A+9 B x) \sqrt {a+b x^2}}{24 b^2}+\frac {\left (3 a^2 B\right ) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )}{8 b^2} \\ & = \frac {A x^2 \sqrt {a+b x^2}}{3 b}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {a (16 A+9 B x) \sqrt {a+b x^2}}{24 b^2}+\frac {3 a^2 B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.74 \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\frac {\sqrt {a+b x^2} \left (-16 a A-9 a B x+8 A b x^2+6 b B x^3\right )}{24 b^2}-\frac {3 a^2 B \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{8 b^{5/2}} \]

[In]

Integrate[(x^3*(A + B*x))/Sqrt[a + b*x^2],x]

[Out]

(Sqrt[a + b*x^2]*(-16*a*A - 9*a*B*x + 8*A*b*x^2 + 6*b*B*x^3))/(24*b^2) - (3*a^2*B*Log[-(Sqrt[b]*x) + Sqrt[a +
b*x^2]])/(8*b^(5/2))

Maple [A] (verified)

Time = 3.39 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.62

method result size
risch \(-\frac {\left (-6 b B \,x^{3}-8 A b \,x^{2}+9 B a x +16 A a \right ) \sqrt {b \,x^{2}+a}}{24 b^{2}}+\frac {3 a^{2} B \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{8 b^{\frac {5}{2}}}\) \(65\)
default \(B \left (\frac {x^{3} \sqrt {b \,x^{2}+a}}{4 b}-\frac {3 a \left (\frac {x \sqrt {b \,x^{2}+a}}{2 b}-\frac {a \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{2 b^{\frac {3}{2}}}\right )}{4 b}\right )+A \left (\frac {x^{2} \sqrt {b \,x^{2}+a}}{3 b}-\frac {2 a \sqrt {b \,x^{2}+a}}{3 b^{2}}\right )\) \(101\)

[In]

int(x^3*(B*x+A)/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/24*(-6*B*b*x^3-8*A*b*x^2+9*B*a*x+16*A*a)/b^2*(b*x^2+a)^(1/2)+3/8*a^2*B/b^(5/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2)
)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.52 \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\left [\frac {9 \, B a^{2} \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + 2 \, {\left (6 \, B b^{2} x^{3} + 8 \, A b^{2} x^{2} - 9 \, B a b x - 16 \, A a b\right )} \sqrt {b x^{2} + a}}{48 \, b^{3}}, -\frac {9 \, B a^{2} \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - {\left (6 \, B b^{2} x^{3} + 8 \, A b^{2} x^{2} - 9 \, B a b x - 16 \, A a b\right )} \sqrt {b x^{2} + a}}{24 \, b^{3}}\right ] \]

[In]

integrate(x^3*(B*x+A)/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/48*(9*B*a^2*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2*(6*B*b^2*x^3 + 8*A*b^2*x^2 - 9*B*a*
b*x - 16*A*a*b)*sqrt(b*x^2 + a))/b^3, -1/24*(9*B*a^2*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - (6*B*b^2*x^
3 + 8*A*b^2*x^2 - 9*B*a*b*x - 16*A*a*b)*sqrt(b*x^2 + a))/b^3]

Sympy [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.16 \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\begin {cases} \frac {3 B a^{2} \left (\begin {cases} \frac {\log {\left (2 \sqrt {b} \sqrt {a + b x^{2}} + 2 b x \right )}}{\sqrt {b}} & \text {for}\: a \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {b x^{2}}} & \text {otherwise} \end {cases}\right )}{8 b^{2}} + \sqrt {a + b x^{2}} \left (- \frac {2 A a}{3 b^{2}} + \frac {A x^{2}}{3 b} - \frac {3 B a x}{8 b^{2}} + \frac {B x^{3}}{4 b}\right ) & \text {for}\: b \neq 0 \\\frac {\frac {A x^{4}}{4} + \frac {B x^{5}}{5}}{\sqrt {a}} & \text {otherwise} \end {cases} \]

[In]

integrate(x**3*(B*x+A)/(b*x**2+a)**(1/2),x)

[Out]

Piecewise((3*B*a**2*Piecewise((log(2*sqrt(b)*sqrt(a + b*x**2) + 2*b*x)/sqrt(b), Ne(a, 0)), (x*log(x)/sqrt(b*x*
*2), True))/(8*b**2) + sqrt(a + b*x**2)*(-2*A*a/(3*b**2) + A*x**2/(3*b) - 3*B*a*x/(8*b**2) + B*x**3/(4*b)), Ne
(b, 0)), ((A*x**4/4 + B*x**5/5)/sqrt(a), True))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.85 \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\frac {\sqrt {b x^{2} + a} B x^{3}}{4 \, b} + \frac {\sqrt {b x^{2} + a} A x^{2}}{3 \, b} - \frac {3 \, \sqrt {b x^{2} + a} B a x}{8 \, b^{2}} + \frac {3 \, B a^{2} \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{8 \, b^{\frac {5}{2}}} - \frac {2 \, \sqrt {b x^{2} + a} A a}{3 \, b^{2}} \]

[In]

integrate(x^3*(B*x+A)/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/4*sqrt(b*x^2 + a)*B*x^3/b + 1/3*sqrt(b*x^2 + a)*A*x^2/b - 3/8*sqrt(b*x^2 + a)*B*a*x/b^2 + 3/8*B*a^2*arcsinh(
b*x/sqrt(a*b))/b^(5/2) - 2/3*sqrt(b*x^2 + a)*A*a/b^2

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.71 \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\frac {1}{24} \, \sqrt {b x^{2} + a} {\left ({\left (2 \, {\left (\frac {3 \, B x}{b} + \frac {4 \, A}{b}\right )} x - \frac {9 \, B a}{b^{2}}\right )} x - \frac {16 \, A a}{b^{2}}\right )} - \frac {3 \, B a^{2} \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{8 \, b^{\frac {5}{2}}} \]

[In]

integrate(x^3*(B*x+A)/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/24*sqrt(b*x^2 + a)*((2*(3*B*x/b + 4*A/b)*x - 9*B*a/b^2)*x - 16*A*a/b^2) - 3/8*B*a^2*log(abs(-sqrt(b)*x + sqr
t(b*x^2 + a)))/b^(5/2)

Mupad [F(-1)]

Timed out. \[ \int \frac {x^3 (A+B x)}{\sqrt {a+b x^2}} \, dx=\int \frac {x^3\,\left (A+B\,x\right )}{\sqrt {b\,x^2+a}} \,d x \]

[In]

int((x^3*(A + B*x))/(a + b*x^2)^(1/2),x)

[Out]

int((x^3*(A + B*x))/(a + b*x^2)^(1/2), x)